package com.example.searchenginebackend.utls;

import com.example.searchenginebackend.common.Result;

public class ResultUtils<T> {
    public static <T> Result<T> success(T data) {
        return new Result<>(data);
    }

    public static <T> Result<T> success(int code, T data, String message) {
        return new Result<>(code, data, message);
    }

    public static <T> Result<T> fail(int code, String message) {
        return new Result<>(code, null, message);
    }
}
